package com.wwg.cms.bo.entity;
import com.wwg.cms.bo.*;
/**
 *create auto on 2010-8-31 16:43:18
 *create by wwl
 * role
 * 
 * @hibernate.class table="role" *  mutable="true" 
 *  proxy="com.wwg.cms.bo.entity.RoleEntity" 
 */
public class RoleEntity implements Role{

	 private Long id;
	 private String name;
	 private String type;
	 private String description;
	/**
	 *
 	 *
	 * @hibernate.id  column="id"
	 *  unsaved-value="null"
 	 *  generator-class="native"
	 * @return Long 
	 */
	public Long getId() {
		return id;
	}
	public void setId(Long id){
		this.id = id;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="name"
	 * @return String 
	 */
	public String getName() {
		return name;
	}
	public void setName(String name){
		this.name = name;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="type"
	 * @return String 
	 */
	public String getType() {
		return type;
	}
	public void setType(String type){
		this.type = type;
	}
	/**
	 *
 	 *
	 * @hibernate.property column="description"
	 * @return String 
	 */
	public String getDescription() {
		return description;
	}
	public void setDescription(String description){
		this.description = description;
	}
  @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RoleEntity that = (RoleEntity) o;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? RoleEntity.class.hashCode()+id.hashCode() : RoleEntity.class.hashCode();
    }


}


